package com.icemelon.catdog.controller;

import com.icemelon.catdog.pojo.Notice;
import com.icemelon.catdog.service.UserNoticeService;
import com.icemelon.catdog.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.awt.geom.RectangularShape;
import java.util.List;

@RestController
public class CampsiteController {
    @Autowired
    private UserNoticeService userNoticeService;
    @GetMapping("/notice")
    public Result getAllNoitce(Integer id){
        List<Notice> allNotice = userNoticeService.getAllNotice(id);
        return Result.success(allNotice);
    }

}
